import request from '@/utils/request'

// 查询档案著录列表
export function apiListDescription(query) {
  return request({
    url: '/am/description/apiList',
    method: 'get',
    params: query
  })
}

// 查询档案著录列表
export function listDescription(query) {
  return request({
    url: '/am/description/list',
    method: 'get',
    params: query
  })
}

// 查询档案著录详细
export function getDescription(id, roleId) {
  return request({
    url: '/am/description/' + id + '?roleId=' + (roleId ? roleId : ''),
    method: 'get'
  })
}

// 新增档案著录
export function addDescription(data) {
  return request({
    url: '/am/description',
    method: 'post',
    data: data
  })
}

// 修改档案著录
export function updateDescription(data) {
  return request({
    url: '/am/description',
    method: 'put',
    data: data
  })
}

// 删除档案著录
export function delDescription(id) {
  return request({
    url: '/am/description/' + id,
    method: 'delete'
  })
}
